/*
 * Copyright 2009 SHOP.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.shop.opensocial.mediated.types;

import java.util.Date;

/**
 * Independent mediator for corresponding OpenSocial type
 *
 * @author Jordan Zimmerman
 */
public class CollectionOptionsMediator
{
	private final String sortBy;
	private final SortOrder sortOrder;
	private final String filter;
	private final FilterOperation filterOperation;
	private final String filterValue;
	private final int first;
	private final int max;
	private final Date updatedSince;

	public enum SortOrder
	{
		ASCENDING,
		DESCENDING
	}

	public enum FilterOperation
	{
		CONTAINS,
		EQUALS,
		STARTSWITH,
		PRESENT
	}

	public CollectionOptionsMediator(String sortBy, SortOrder sortOrder, String filter, FilterOperation filterOperation, String filterValue, int first, int max, Date updatedSince)
	{
		this.sortBy = sortBy;
		this.sortOrder = sortOrder;
		this.filter = filter;
		this.filterOperation = filterOperation;
		this.filterValue = filterValue;
		this.first = first;
		this.max = max;
		this.updatedSince = updatedSince;
	}

	public String getSortBy()
	{
		return sortBy;
	}

	public SortOrder getSortOrder()
	{
		return sortOrder;
	}

	public String getFilter()
	{
		return filter;
	}

	public FilterOperation getFilterOperation()
	{
		return filterOperation;
	}

	public String getFilterValue()
	{
		return filterValue;
	}

	public int getFirst()
	{
		return first;
	}

	public int getMax()
	{
		return max;
	}

	public Date getUpdatedSince()
	{
		return updatedSince;
	}
}
